import React from 'react';
import styles from './index.less';
import {Link,history,useNavigate} from '@umijs/max';
import { FormattedMessage } from 'umi';
import {Button} from 'antd';
export default function Page() {
  const navigate = useNavigate();
  return (
    <div>
      <h1 className={styles.title}>Page index</h1>
      <Link to="/profile">跳到个人中心页</Link>
      <Button type="primary" onClick={()=>history.push('/profile')}>跳到个人中心</Button>
      <Button type="primary" onClick={()=>navigate('/profile')}>跳到个人中心</Button>
      <FormattedMessage id="welcome" />
    </div>
  );
}
